export default{
    data(){
        return{

        }
    },
    methods: {
        $navTo(url){
            var token = localStorage.getItem('token')
            var auth = ['/home/shoppingCart']
            console.log(auth.indexOf(url) === 0 && !token)
            if(auth.indexOf(url) === 0 && !token){
                this.$router.push('/login')
                return false;
            }
            if(url){
                this.$router.push(url);
            }
        }
    },
}